package com.fy.auth.feign;


import com.fy.auth.vo.SocialUser;
import com.fy.auth.vo.UserLoginVo;
import com.fy.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("application-user")
public interface UserFeignService {
    @PostMapping(value = "/user/register")
    Boolean register(@RequestBody UserRegisterVo vo);

    @PostMapping(value = "/user/login")
    String login(@RequestBody UserLoginVo vo);

    @PostMapping(value = "/user/oauth2/login")
    Map<String, String> oauthLogin(@RequestBody SocialUser socialUser);

    @PostMapping(value = "/user/weixin/login")
    String weixinLogin(@RequestParam("accessTokenInfo") String accessTokenInfo);

}
